The present invention relates to a rule processing system and, more particularly, to a rule based system which is suitable for either a control system selecting control commands for facilities by for judging a condition in accordance with control logic described in rules and the statuses of the grouped individual facilities or a production planning system for retrieving an order and a material from given order and material data in accordance with production planning logics described in the rules.
In an FA (i.e., Factory Automation) system, changes in the production line and in its use are frequently conducted in accordance with shortening of the lifecycle of products and diversity of the kinds of the products. This makes it necessary to develop and maintain the control programs promptly.
In the prior art, there has been adopted a method by which the control programs are developed in a general purpose language such as FORTRAN. However, this method has failed to satisfy the above need because it takes much time and requires special programmers to develop, understand and change the control programs. Therefore, we have proposed the "facility group control system" (as is disclosed in U.S. Pat. No. 4,628,434) which is easy to describe, and in which it is easy to understand and change the logics. The above-specified system is called a rule based system which can prepare the programs merely by describing the logics in an arbitrary Japanese letter array into the rule type of "IF (condition) and THEN (conclusion and operation)" (which will be shortly referred to as an "IF-THEN rule" or more shortly as the "rule"). In this system it is easy to develop the programs, and excellent for understanding and changing the logics. According to the above-specified proposal, the rules can be processed at a high speed by coding and handling the information of a letter array representing the condition, conclusion and operation of the rules and the status of a target.
The application of that rule based system is advancing to a large-scaled FA such as an automated warehouse system or a production plan but requires much time for executing the rules and has a poor response time. A first problem in the conventional system is that the time period required for judging one rule condition and the time period for obtaining a final conclusion are increased if the number of the rules necessary for obtaining the final conclusion or the number of the target statuses is increased, because the condition judgement as to whether or not there is present a value meeting simultaneously all the conditions described in the IF part is conducted by picking up the rules one by one. More specifically, there arises no problem in case one group to be processed is composed of about ten facilities, but a practically sufficient processing speed cannot be expected for a production plan handling one hundred and more target statuses or for shelf determination of the automated warehouse.
The facility group control system of the above-referenced Patent is simple in construction, because it picks up the rules one by one for processings, but it processes rules serially even if these rules could be processed in parallel. More specifically, the rules without the relation, in which the conclusion of one rule is used for judging the condition of another rule, i.e., the independent rules may be processed at any time, in any order and simultaneously, but they cannot be processed in parallel according to the method of the referenced Patent. This makes it impossible to retain a sufficient processing speed in accordance with increase in the condition judgement time per one rule due to the increases in the number of the rules and in the target statuses. Therefore, the proposed rule based system takes an outstanding time for processing a large-scaled target having several hundreds of rules or several hundreds to thousands of statuses so that it has been found difficult to apply that system to a large-scaled target.
A second problem is that the time for JOIN operation to generate a variable value meeting and the AND condition is increased in proportion to the product of the numbers of the variable values because of the variable values picked up have to be combined for judgement; therefore, it obstructs the processing speed. The algorithm of the JOIN arithmetic by the conventional programs is exemplified by the proposed rule based system or a system which is disclosed in papers such as "High-Speed Algorithm by Order Maintaining Hash Function: Data Processing Theses, Vol. 15, No. 1, pp 59 to 65, Jan. (1984)". All the systems cannot be expected to have a sufficient processing speed in case the JOIN algorithm is required for many data, because all of them resort to sequential processing using the programs. As a result, those systems raises no problem, when the number of the target statuses corresponding to the conditions described in the IF part is small, but is troubled by the outstanding processing required for the objects having a status number of several hundreds or thousands.